From 835c9cc91ed110257494b59e71afdc938d47d904 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 14 Nov 2000 04:40:01 +0000 Subject: [PATCH] (byte-compile-unfold-lambda): Don't recursively optimize body because that can lead to infinite recursion; see comment there. --- lisp/emacs-lisp/byte-opt.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index c3c8e677239..da695386604 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -340,7 +340,12 @@ (byte-compile-warn "Attempt to open-code `%s' with too many arguments" name)) form) - (setq body (mapcar 'byte-optimize-form body)) + + ;; The following leads to infinite recursion when loading a + ;; file containing `(defsubst f () (f))', and then trying to + ;; byte-compile that file. + ;(setq body (mapcar 'byte-optimize-form body))) + (let ((newform (if bindings (cons 'let (cons (nreverse bindings) body)) -- 2.30.2